/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.business.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import me.zhengjie.base.BaseBusiness;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;

/**
* @website https://el-admin.vip
* @description /
* @author xiahongbo
* @date 2022-08-10
**/
@Entity
@Data
@Table(name="BIS_FIXED_COSTS")
public class FixedCosts extends BaseBusiness implements Serializable {

    @Id
    @GenericGenerator(name = "hibernate-uuid", strategy = "uuid")
    @GeneratedValue(generator = "hibernate-uuid")
    @Column(name = "BIS_FIXED_COSTS_ID")
    @ApiModelProperty(value = "固费设置ID")
    private String bisFixedCostsId;

    @Column(name = "BIS_FIXED_COSTS_JZID")
    @ApiModelProperty(value = "就诊ID")
    private Long bisFixedCostsJzid;

    @Column(name = "BIS_FIXED_COSTS_ZHID")
    @ApiModelProperty(value = "照护ID")
    private Long bisFixedCostsZhid;

    @Column(name = "BIS_FIXED_COSTS_YPBM")
    @ApiModelProperty(value = "对照码")
    private String bisFixedCostsYpbm;

    @Column(name = "BIS_FIXED_COSTS_MC")
    @ApiModelProperty(value = "项目名称")
    private String bisFixedCostsMc;

    @Column(name = "BIS_FIXED_COSTS_DJ")
    @ApiModelProperty(value = "零售价")
    private BigDecimal bisFixedCostsDj;

    @Column(name = "BIS_FIXED_COSTS_SL")
    @ApiModelProperty(value = "数量")
    private Long bisFixedCostsSl;

    @Column(name = "BIS_FIXED_COSTS_ZJ")
    @ApiModelProperty(value = "金额")
    private BigDecimal bisFixedCostsZj;

    @Column(name = "BIS_FIXED_COSTS_ZXKS")
    @ApiModelProperty(value = "执行科室")
    private String bisFixedCostsZxks;

    @Column(name = "BIS_FIXED_COSTS_ZXTS")
    @ApiModelProperty(value = "执行天数")
    private Long bisFixedCostsZxts;

    @Column(name = "BIS_FIXED_COSTS_JX")
    @ApiModelProperty(value = "剂型")
    private String bisFixedCostsJx;

    @Column(name = "BIS_FIXED_COSTS_JL")
    @ApiModelProperty(value = "剂量")
    private BigDecimal bisFixedCostsJl;

    @Column(name = "BIS_FIXED_COSTS_YF")
    @ApiModelProperty(value = "用法")
    private String bisFixedCostsYf;

    @Column(name = "BIS_FIXED_COSTS_YL")
    @ApiModelProperty(value = "用量")
    private BigDecimal bisFixedCostsYl;

    @Column(name = "BIS_FIXED_COSTS_SYPC")
    @ApiModelProperty(value = "使用频次")
    private String bisFixedCostsSypc;

    @Column(name = "BIS_FIXED_COSTS_DW")
    @ApiModelProperty(value = "单位")
    private String bisFixedCostsDw;

    @Column(name = "BIS_FIXED_COSTS_GG")
    @ApiModelProperty(value = "规格")
    private String bisFixedCostsGg;

    @Column(name = "BIS_FIXED_COSTS_FWLX")
    @ApiModelProperty(value = "服务类型")
    private String bisFixedCostsFwlx;

    public void copy(FixedCosts source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
    @Override
    public int hashCode() {
        return Objects.hash(bisFixedCostsId, bisFixedCostsJzid, bisFixedCostsZhid);
    }
}